package com.niuxiaofa.newlaw.View;

import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.widget.TextView;

import com.niuxiaofa.newlaw.R;


public class CleanCacheDialog extends AlertDialog {
    public Onclick onclick;
    private TextView not_perfect_yet, perfect_yet;

    public CleanCacheDialog(Context context, Onclick onclick) {
        this(context, R.style.AlertDialog);
        this.onclick = onclick;
    }

    public CleanCacheDialog(Context context, int i) {
        super(context, i);
    }

    protected CleanCacheDialog(Context context, boolean z, OnCancelListener onCancelListener) {
        super(context, z, onCancelListener);
    }

    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.dialog_clean);
        this.not_perfect_yet = findViewById(R.id.not_perfect_yet);
        setCanceledOnTouchOutside(false);

        this.perfect_yet = findViewById(R.id.perfect_yet);

        not_perfect_yet.setOnClickListener(e -> {
            dismiss();
        });

        perfect_yet.setOnClickListener(e -> {
            onclick.click();
            dismiss();
        });


    }

    public interface Onclick {
        void click();
    }


}
